<template>
    <div class="balance">
        <ul v-for="(item, index) in list" :key="index">
            <li>
                <div class="left">
                    <div class="left-title">{{ item.title }}</div>
                    <div class="views">{{ `${indicate}  ${item.views}` }}</div>
                </div>
                <div class="right">
                    <img :src="item.imgurl" alt="">
                </div>
            </li>
        </ul>
    </div>
</template>

<script setup>
const props = defineProps({
    list: {
        type: Array,
        required: true,
        default: () => []
    },
    indicate: {
        type: String
    }
})
</script>

<style lang="less" scoped>
.balance {

    ul {
        display: flex;
        flex-direction: 'column';

        li {
            width: 100%;
            height: 80px;
            display: flex;
            justify-content: space-between;
            margin-bottom: 40px;
        }

        .left {
            width: 100%;
            display: flex;
            flex-direction: column;

            .left-title {
                padding-right: 10px;
                font-size: 14px;
                font-weight: 900;
                color: #333333;
                height: 40px;
                white-space: pre-line;
                /*允许换行*/
                overflow: hidden;
                text-overflow: ellipsis;
                /*省略号*/
                display: -webkit-box;
                -webkit-box-orient: vertical;
                /*行向垂直排列*/
                -webkit-line-clamp: 2;
                /*限制2行*/
            }

            .views {
                font-size: 12px;
                margin-top: auto;
            }
        }

        .right {
            // width: 100%;
            // display: flex;
            // justify-content: center;
            // align-items: center;

            img {
                width: 120px;
                height: 70px;
            }
        }
    }
}
</style>